package com.zdw.demo.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * description
 *
 * @author 卓德文
 * @date 2022/11/22
 */
@Component
@FeignClient(name = "template", contextId = "com.zdw.demo.feign.SeataDemoOneFeignClient" /*, fallback = SeataDemoOneClientFallbackFactory.class*/)
public interface SeataDemoOneFeignClient {

    /**
     * feign远程调用出库模块的测试方法,测试seata分布式事务
     *
     * @param inNo
     * @param outBound
     * @return
     */
    @RequestMapping(value = "/demoTwo/testSeata", method = RequestMethod.POST)
    ResponseEntity<Integer> testSeata(@RequestParam("inNo") String inNo, @RequestParam("outBound") String outBound);


}
